package com.cardmanager.pro.business;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Pageable;

import com.cardmanager.pro.pojo.CreditCardAccount;

public interface CreditCardAccountBusiness {

	CreditCardAccount findByUserIdAndCreditCardNumberAndVersion(String userId, String creditCardNumber,String version);

	CreditCardAccount save(CreditCardAccount creditCardAccount);

	CreditCardAccount updateCreditCardAccountAndVersion(String userId, String creditCardNumber,String taskId, int addOrSub, BigDecimal amount,String description,String version);

	List<CreditCardAccount> findCreditCardAccountByBlanceNotZeroAndVersion(String version,Pageable pageable);

	List<CreditCardAccount> findByFreezeBlanceGreaterThan0AndVersion(String version);

	CreditCardAccount findByCreditCardNumberAndVersion(String creditCardNumber,String version);

	List<CreditCardAccount> findByFreezeBlanceAndVersion(BigDecimal amount,String version);

	List<CreditCardAccount> findCreditCardAccountByBlanceLessTenAndVersion(String version,Pageable pageable);

	List<CreditCardAccount> findByBlanceAndVersionAndLastUpdateTimeLessThan(BigDecimal blance, String version,Date time);

}
